<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.fc.util.*" %>
<%@ page import="com.fc.model.Member" %>
<%@ page import="com.fc.control.MemberControl" %>
<%@ page import = "com.fc.control.DateControl"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>member_add</title>
</head>
<script language="javascript"> 
		function check()
		{
			    if(document.form1.store_id.value=="")
				{
					alert("店铺编号");
					document.form1.store_id.focus();
					return;
				}
				else if(document.form1.start_time.value=="")
				{
					alert("开始时间");
					document.form1.start_time.focus();
					return;
				}
				else if(document.form1.end_time.value=="")
				{
					alert("结束时间");
					document.form1.end_time.focus();
					return;
				}
				else if(document.form1.phone.value=="")
				{
					alert("电话");
					document.form1.phone.focus();
					return;
				}
				else if(document.form1.idcard.value=="")
				{
					alert("身份证号");
					document.form1.idcard.focus();
					return;
				}
				else if(document.form1.name.value=="")
				{
					alert("姓名");
					document.form1.name.focus();
					return;
				}
				else if(document.form1.sex.value=="")
				{
					alert("性别");
					document.form1.sex.focus();
					return;
				}
				else if(document.form1.username.value=="")
				{
					alert("用户名");
					document.form1.username.focus();
					return;
				}
				else if(document.form1.password.value=="")
				{
					alert("密码");
					document.form1.password.focus();
					return;
				}
				else if(document.form1.kind.value=="")
				{
					alert("会员类型");
					document.form1.kind.focus();
					return;
				}
				else
				{form1.submit();}
		} 
		</script>
<body>
 <%
      request.setCharacterEncoding("UTF-8");
      int id=ParamUtil.getInt(request,"member_id",0);
      //int store_id =  Integer.parseInt((String)session.getAttribute("id"));
      DateControl dc = new DateControl();
	  String start_time = dc.Date();
  %>
 <form action="member_add_do.jsp"id=<%=id %> name="form1" method="post">
  	<table width="400" border="0" cellpadding="2" cellspacing="0">
  	          <tr>
  	            <td>店铺编号</td>
  	            <td><input type="text" name="store_id"></td>
  	          </tr> 	          
		
			  <tr>
  	            <td>办理时间</td>
  	            <td><input type="text" readonly="true" name="start_time" value=<%=start_time %>></td>
  	          </tr>
  	          <tr>
			    <td>会员类型</td>
			    <td>
			        <input type="radio" name="kind" value="0">临时卡
			        <input type="radio" name="kind" value="1">月卡
			        <input type="radio" name="kind" value="2">年卡
			    </td>
		      </tr>
  	          <tr>
  	            <td>结束时间</td>
  	            <td><input type="text" name="end_time" value=<%=start_time%>></td>
  	          </tr>
  	          <tr>
  	            <td>用户名</td>
  	            <td><input type="text" name="username"></td>
  	          </tr> 
  	          <tr>
  	            <td>密码</td>
  	            <td><input type="text" name="password"></td>
  	          </tr> 
  	          <tr>
  	            <td>电话号码</td>
  	            <td><input type="text" name="phone"></td>
  	          </tr> 	          	          	          
  	          <tr>
  	            <td>性别</td>
  	            <td>
  	              <input type="radio" name="sex" value="1" checked>男
  	              <input type="radio" name="sex" value="2">女
  	             </td>
  	          </tr>
 	          <tr>
  	            <td>身份证号</td>
  	            <td><input type="text" name="idcard"></td>
  	          </tr>
  	          <tr>
  	            <td>姓名</td>
  	            <td><input type="text" name="name"></td>
  	          </tr>

    </table>
    <input type="submit" value="提交" onClick="check()" />
    <input type="reset" name="Reset" value="重置" />
 </form>
</body>
</html>